package com.gurun.camera.addDevice.util;

import android.content.Context;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiManager;

import java.util.List;

/**
 * Created by Administrator on 2016/9/13.
 */
public class WifiUtil {
    public static String getCapabilities(Context context, String ssid){
        WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
        List<ScanResult> scanResultList = wifiManager.getScanResults();
        if(scanResultList.size() > 0){
            for(ScanResult scanResult : scanResultList){
                if(scanResult.SSID.equals(ssid)){
                    return scanResult.capabilities;
                }
            }
        }
        return null;
    }
}
